package club.beimeng.emailserver2.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 小艾同学
 * @since 2021-09-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="EmailAccount对象", description="")
public class EmailAccount implements Serializable {

    private static final long serialVersionUID = 1L;
    private static final int FORBIDDEN = 0;
    private static final int NORMAL = 1;
    private static final int UNAVAILABLE = 2;
    private static final int NEVER_USE = -1;

    @JsonSerialize(using= ToStringSerializer.class)
    @TableId(value = "eid", type = IdType.ASSIGN_ID)
    private Long eid;

    @ApiModelProperty(value = "邮箱账号 | 例如yeah@qq.com")
    private String emailNumber;

    @ApiModelProperty(value = "邮箱授权码 | 允许smtp 的授权码")
    private String enableCode;

    @ApiModelProperty(value = "状态| 正常 1 | 禁用 0 | 不可用 2 | 未使用 -1")
    private Integer status;

    @ApiModelProperty(value = "账号给予者")
    private String owner;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


}
